package gugga.tasks.events
{
	import flash.events.Event;
	
	public class ProgressiveTaskEvent extends TaskEvent
	{
		public static const PROGRESS : String = "progress";
		
		public var Percents : Number;
		public var Total : Number;
		public var Current : Number;
		
		//TODO: Should we assert that values percents, total and current are between interval (0, 100)		
		public function ProgressiveTaskEvent(aType:String, 
			aPercents : Number, aTotal : Number, aCurrent : Number, 
			aBubbles : Boolean=false, aCancelable : Boolean=false)
		{
			super(aType, aBubbles, aCancelable);
			
			Percents = aPercents;
			Total = aTotal;
			Current = aCurrent;
		}
		
		public override function clone() : Event
		{
			return new ProgressiveTaskEvent(type, Percents, Total, Current, bubbles, cancelable);
		}		
	}
}